<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="template/template.xhtml">
        <ui:define name="title">
            <h:outputText value="Contact Us"></h:outputText>
        </ui:define>
        <ui:define name="banner">
            <div  style="background: url(images/contact.jpg);"  id="banner"></div>
        </ui:define>

        <ui:define name="body">
            <style type="text/css">
                .clsGrowing, .clsWaiting {
                    margin-left: 99px;
                    margin-right: 17px;
                    width: 276px;
                }
            </style>

            <div id="services" class="clsClearfix">
                <div class="clsGrowing clsFloatLeft" >
                    <div class="inner_t">
                        <h:form>
                            <h:panelGroup id="messagePanel" layout="block">
                                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                                <h:panelGroup rendered="#{contactus.submitted== 1}">
                                    Submitted Successfully 
                                </h:panelGroup>
                            </h:panelGroup>
                            <div>
                                <h:outputLabel value="Name: " for="" /><br/>
                                <h:inputText id="name_" value="#{contactus.name}" title="Your Name : " size="40" required="true" requiredMessage="#{bundle.EnterName}" />
                            </div>
                            <div>
                                <h:outputLabel value="E-mail: " for="" /><br/>
                                <h:inputText id="email_" value="#{contactus.email}" title="Your Email : " required="true" size="40" requiredMessage="#{bundle.EnterEmail}"  validatorMessage="Enter Valid Email ">
                                    <f:validateRegex pattern="^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$" for="test"/>
                                </h:inputText> 
                            </div>
                            <div>
                                <div>
                                    <h:outputLabel value="Subject: " for="" /><br/>
                                    <h:inputText id="name_title" value="#{contactus.title}" size="40" title="Message Title " required="true" requiredMessage="#{bundle.EnterTitle}" />
                                </div>
                                <h:outputLabel value="Description: " for="" /><br/>
                                <h:inputTextarea rows="4" cols="31" id="message_" value="#{contactus.message}" title="Your problem " required="true" requiredMessage="#{bundle.EnterMessage}"/>
                            </div>
                            <div>
                                <h:commandButton id="button1" value="Send" action="#{contactus.sendContact()}" />
                            </div>
                        </h:form>
                    </div>
                </div>
            </div>
        </ui:define>
    </ui:composition>
</html>

